import 'package:flutter/material.dart';

import 'image_scan_widget.dart';

void main() {
  runApp(MaterialApp(
    title: 'Flutter Demo',
    debugShowCheckedModeBanner: false,
    theme: ThemeData(
      primarySwatch: Colors.blue,
    ),
    home: HomePage(),
  ));
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("轮播的照片"),
      ),
      body: InkWell(
        onTap: () {
          List<String> list = [
            "https://cdn.pixabay.com/photo/2021/06/04/15/50/skateboarding-6310245__340.jpg",
            "https://cdn.pixabay.com/photo/2021/06/01/16/15/island-6302137__340.jpg",
            "https://cdn.pixabay.com/photo/2021/05/27/14/40/anemone-6288318__340.jpg"
          ];
          Navigator.of(context).push(MaterialPageRoute(
              builder: (BuildContext context) => ImageScanWidget(list)));
        },
        child: Container(
          width: double.infinity,
          height: 350,
          child: Image.network(
              "https://cdn.pixabay.com/photo/2021/06/04/17/04/caldera-6310371__340.jpg",
              fit: BoxFit.fill),
        ),
      ),
    );
  }
}
